clc; clear;
% 仿真 c 的自适应演化，将 k=0.04 与 k=0.06 两种增益下的结果进行对比。

params.a = 0.7;
params.b = 0.8;
params.alpha = 0.25;
params.beta = 0.01;
params.delta = 0.1;
params.A = 0.35;   % 振幅
params.f = 0.72;   % 频率
params.epsilon = 0.001;

% 初始条件 [x, y, z, c]
x0 = 0.2;
y0 = 0;
z0 = 0.01;
c0 = 0.1;
y_init = [x0; y0; z0; c0];

tspan = [0, 1000];   % 仿真时间区间
h =3.625;           % 步长

% k = 0.04 情况
params1 = params;
params1.k = 0.04;
fun1 = @(t, y) hybridNeuron_AdpC(t, y, params1);
[t1, Y1] = rk4(fun1, tspan, y_init, h);

% k = 0.06 情况
params2 = params;
params2.k = 0.06;
fun2 = @(t, y) hybridNeuron_AdpC(t, y, params2);
[t2, Y2] = rk4(fun2, tspan, y_init, h);

plot(t1, Y1(:,4), 'b', t2, Y2(:,4), 'r');
xlabel('时间 \tau');
ylabel('参数 c');
legend('k = 0.04', 'k = 0.06');
